package com.ydl.partitionscheduler.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Data
@Component
@ConfigurationProperties(prefix = "partition")
public class TablePartitionProperties {

    private List<TablePartitionConfig> tables;


    @Data
    public static class TablePartitionConfig {
        private String mainTable;
        private String partitionKey;
        private String partitionType = "RANGE";
        private String strategy;
        private int divideCount;
        private int preCreateCount;
        private String namePattern;
        private String valuePattern;
        private String timeUnit;
    }
}
